<!doctype html>
<html>
<?php echo $this->fetch('head.html'); ?>

<body>
<div class="header" >
  <div  class="left-btn pointer" onClick="window.location='<?php echo $this->_var['appymdian']; ?>'"><span class="iconfont icon-back"></span></div>
  <div class="title">订单管理</div>
  <div class="right-btn" id="showSearch"><span class="iconfont icon-search"></span></div>
</div>
<div class="row">
  <div class="tabs-border  i4"> 
  <a href="<?php echo $this->_var['appymdian']; ?>?m=ymdian_order&status=0" class="item <?php if (get ( 'status' ) == 0): ?>active<?php endif; ?>">未处理</a> 
  <a href="<?php echo $this->_var['appymdian']; ?>?m=ymdian_order&status=1" class="item <?php if (get ( 'status' ) == 1): ?>active<?php endif; ?>">已确认</a> 
 
  <a href="<?php echo $this->_var['appymdian']; ?>?m=ymdian_order&status=3" class="item <?php if (get ( 'status' ) == 3): ?>active<?php endif; ?>">已完成</a> 
  <a href="<?php echo $this->_var['appymdian']; ?>?m=ymdian_order&status=10" class="item <?php if (get ( 'status' ) == 10): ?>active<?php endif; ?>">已取消</a> 
  </div>
</div>
<div class="row">
<form method="get" action="<?php echo $this->_var['appymdian']; ?>">
  <input type="hidden" name="m" value="ymdian_order" />
  <input type="hidden" name="a" value="default" />
  <div class="pd-5" id="searchBox" style="display:none">
    <div class="input-row">
      <label >订单号</label>
      <input type="text" name="orderno" value="<?php echo $_GET['orderno']; ?>" />
    </div>
    <div class="input-row">
      <label>用户</label>
      <input type="text" name="nickname" value="<?php echo $_GET['nickname']; ?>" />
    </div>
    <div class="input-row">
      <select name="status" class="txt">
        <option value="-1">请选择状态</option>
        
<?php $_from = $this->_var['order_status_list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['c']):
?>
<?php if ($this->_var['k'] < 99): ?>
        <option value="<?php echo $this->_var['k']; ?>" <?php if ($_GET['status'] == $this->_var['k']): ?> selected="selected" <?php endif; ?>><?php echo $this->_var['c']; ?></option>
        <?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

      </select>
    </div>
    <div class="form-btns">
      <button type="submit"   class="btn btn-warning btn-row" />
      搜索
      </button>
    </div>
  </div>
</form>
<div class="market_tabs">
  <div class="first_item">共<?php echo $this->_var['rscount']; ?>笔</div>
  <ul class="last_item">
    <li class="b3"><a href="<?php echo $this->_var['baseurl']; ?>&orderby=id&index=<?php if (get ( 'orderby' ) == 'id' && get ( 'index' ) == 'asc'): ?>desc<?php else: ?>asc<?php endif; ?>" class="<?php if (get ( 'orderby' ) == 'id'): ?>cur<?php endif; ?>">时间</a></li>
    <li class="b2"><i class="ico top  <?php if (get ( 'index' ) == 'asc'): ?>cur<?php endif; ?>"></i><br>
      <i class="ico bot <?php if (get ( 'index' ) == 'desc'): ?>cur<?php endif; ?>"></i></li>
    <li class="b1"><a href="<?php echo $this->_var['baseurl']; ?>&orderby=sushe&index=<?php if (get ( 'orderby' ) == 'sushe' && get ( 'index' ) == 'desc'): ?>asc<?php else: ?>desc<?php endif; ?>" class="<?php if (get ( 'orderby' ) == 'sushe'): ?>cur<?php endif; ?>">寝室号</a></li>
  </ul>
</div>
 
 <div class="clearfix"></div>
<div class="uclist" > <?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
  <div class="item" onClick="window.location='<?php echo $this->_var['appymdian']; ?>?m=ymdian_order&a=show&order_id=<?php echo $this->_var['c']['order_id']; ?>'">
   <div class="hd"> <?php echo $this->_var['c']['address']['p_c_t']; ?>-<?php echo $this->_var['c']['address']['sushe']; ?>寝室 <span class="right">订单号:<?php echo $this->_var['c']['orderno']; ?></span> </div>
   <div class="row pos">
    <div class="g-s1">
     
      <div class="h2">共<?php echo $this->_var['c']['num']; ?>件 合计<?php echo $this->_var['c']['money']; ?>元 <span class="right"><?php echo $this->_var['c']['address']['truename']; ?></span></div>
      <div class="h2"><?php echo date("Y-m-d H:i:s",$this->_var['c']['dateline']); ?>  
      	<span class="right">&nbsp;<?php if ($this->_var['c']['ispay'] == 2): ?>
        			<?php if ($this->_var['c']['paytype'] == 'alipay'): ?>支付宝<?php elseif ($this->_var['c']['paytype'] == 'wxpay'): ?>微信支付<?php else: ?>在线支付<?php endif; ?>
        		<?php else: ?><?php if ($this->_var['c']['unpay']): ?>货到付款<?php else: ?>未支付<?php endif; ?><?php endif; ?></span>
      </div>
    </div>
    <div class="g-m1"> &gt; </div>
    <div class="clearfix"></div>
    </div>
  </div>
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  <?php echo $this->_var['pagelist']; ?> </div>
<script language="javascript" src="/plugin/My97DatePicker/WdatePicker.js"></script> 
<script>
$(function(){
	
	$("#showSearch").on(CLICK,function(){
		$("#searchBox").toggle();
	});
	
})
</script> 
<?php $this->assign('botnav','ymdian_order'); ?>
<?php echo $this->fetch('footer.html'); ?>
